# 设置目标系统
set(CMAKE_SYSTEM_NAME WIN32)
message("USE WIN CONFIG")

# 设置工具链目录
set(TOOL_CHAIN_DIR /usr/x86_64-w64-mingw32)
set(TOOL_CHAIN_INCLUDE 
    ${TOOL_CHAIN_DIR}/include/
    )
set(TOOL_CHAIN_LIB 
    ${TOOL_CHAIN_DIR}/lib
    )

# 设置编译器位置
set(CMAKE_C_COMPILER "x86_64-w64-mingw32-gcc")
set(CMAKE_CXX_COMPILER "x86_64-w64-mingw32-g++")

# 设置Cmake查找主路径
set(CMAKE_FIND_ROOT_PATH ${TOOL_CHAIN_DIR})


set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
# 只在指定目录下查找库文件
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
# 只在指定目录下查找头文件
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
# 只在指定目录下查找依赖包
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)

include_directories(
    ${TOOL_CHAIN_DIR}/include
    )

set(CMAKE_INCLUDE_PATH 
    ${TOOL_CHAIN_INCLUDE}
    )

set(CMAKE_LIBRARY_PATH 
    ${TOOL_CHAIN_LIB}
    )